import request from '@/utils/request'

// 创建用户积分兑换
export function createScoreRecord(data) {
  return request({
    url: '/member/score-record/create',
    method: 'post',
    data: data
  })
}

// 更新用户积分兑换
export function updateScoreRecord(data) {
  return request({
    url: '/member/score-record/update',
    method: 'put',
    data: data
  })
}

// 删除用户积分兑换
export function deleteScoreRecord(id) {
  return request({
    url: '/member/score-record/delete?id=' + id,
    method: 'delete'
  })
}

// 获得用户积分兑换
export function getScoreRecord(id) {
  return request({
    url: '/member/score-record/get?id=' + id,
    method: 'get'
  })
}

// 获得用户积分兑换分页
export function getScoreRecordPage(query) {
  return request({
    url: '/member/score-record/page',
    method: 'get',
    params: query
  })
}

// 导出用户积分兑换 Excel
export function exportScoreRecordExcel(query) {
  return request({
    url: '/member/score-record/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
